/**
 * @param {string} s
 * @return {boolean}
 */
var isNumber = function (s) {
  let, dotmode = false, emode = false, type = false, numbermode = false
  let index
  while (s[index] != ' ') index++
  let i
  for (i = index; i < s.length && s[i] != ' '; i++) {
    if (s[i] == '+' || s[i] == '-') {
      if (type) return false
      else {
        type = true
        continue
      }
    }
    else if (s[i] == '.') {
      if(emode|| dotmode) return false
      dotmode = true
      continue
    }
    else if (s[i] == 'e' || s[i] == 'E') {
      if(dotmode || emode){
        return false
      }
      emode = true
      continue
    }
    else if (s[i] >= '0' && s[i] <= '9') {
      if(!numbermode){
        numbermode = true
        continue
      }else{
        if(dotmode){

        }
      }




    }
    else {
      return false
    }



  }
  return true

};